pkg_check_modules(samplerate IMPORTED_TARGET samplerate)
if(TARGET PkgConfig::samplerate)
    add_library(mltresample MODULE factory.c filter_resample.c)
    target_link_libraries(mltresample mlt PkgConfig::samplerate)
    set_target_properties(mltresample PROPERTIES LIBRARY_OUTPUT_DIRECTORY ..)
    install(TARGETS mltresample LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/mlt)
    file(GLOB yml *.yml)
    install(FILES ${yml} DESTINATION ${CMAKE_INSTALL_DATADIR}/mlt/resample)
endif()
